package com.boot.main.mapper;

import com.boot.main.entity.ScomAd;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface ScomAdMapper {
    List<ScomAd> getAds(@Param("currentSize") Integer currentSize, @Param("limit") Integer limit, @Param("name") String name, @Param("userId") Long userId);
    Integer getTotalCount(@Param("userId") Long userId);
    Integer saveAd(ScomAd ad);
    Integer updateAd(ScomAd ad);
    Integer deleteAd(@Param("id") Long id);
}
